/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package codec.fibonacci;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author Douglas
 */
public class Teste {
    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        File f1 = new File("D://teste.txt");
        CodificadorArquivo ca = new CodificadorArquivo(f1);
        File f2 = null;

        try {
            f2 = ca.CodificaArquivo();
        } catch (FileNotFoundException ex) {
            Logger.getLogger(Teste.class.getName()).log(Level.SEVERE, null, ex);
        } catch (IOException ex) {
            Logger.getLogger(Teste.class.getName()).log(Level.SEVERE, null, ex);
        }
        
        DecodificadorArquivo da = new DecodificadorArquivo(f2);
        try {
            da.DecodificaArquivo();
        } catch (FileNotFoundException ex) {
            Logger.getLogger(Teste.class.getName()).log(Level.SEVERE, null, ex);
        } catch (IOException ex) {
            Logger.getLogger(Teste.class.getName()).log(Level.SEVERE, null, ex);
        }
        

        CodificadorFibonacci c1 = new CodificadorFibonacci();
        c1.setCaracter('P');
        c1.MontaBitSet();
        if (c1.bitSetToInt()){
            System.out.println(c1.getIntBitSet());
        }
        c1.setCaracter('P');
        c1.MontaBitSet();
        if (c1.bitSetToInt()){
            System.out.println(c1.getIntBitSet());
        }
        c1.setCaracter('R');
        c1.MontaBitSet();
        if (c1.bitSetToInt()){
            System.out.println(c1.getIntBitSet());
        }
        c1.setCaracter('A');
        c1.MontaBitSet();
        if (c1.bitSetToInt()){
            System.out.println(c1.getIntBitSet());
        }
        c1.setCaracter('L');
        c1.MontaBitSet();
        if (c1.bitSetToInt()){
            System.out.println(c1.getIntBitSet());
        }
        c1.setCaracter('E');
        c1.MontaBitSet();
        if (c1.bitSetToInt()){
            System.out.println(c1.getIntBitSet());
        }
        c1.setCaracter('L');
        c1.MontaBitSet();
        if (c1.bitSetToInt()){
            System.out.println(c1.getIntBitSet());
        }
        c1.setCaracter('O');
        c1.MontaBitSet();
        if (c1.bitSetToInt()){
            System.out.println(c1.getIntBitSet());
        }

    }
}
